<?php
/**
 * Created by JetBrains PhpStorm.
 * User: T420
 * Date: 9/27/12
 * Time: 10:16 PM
 * To change this template use File | Settings | File Templates.
 */
class Models_News extends Libs_Model
{
    public function __construct()
    {
        parent::__construct();
    }
    public function getallnews()

    {
        $this->db->connect();
        $list=$this->db->executeQuery("select * from lb_news where status=1");
        $this->db->disconnect();
        return $list;
    }
    public function getdetailnews($id)
    {
        $this->db->connect();
        $list=$this->db->executeQuery("select * from lb_news where newsid='$id'");
        $this->db->disconnect();
        return $list;
    }
    public function getnewsthem($id)
    {
        $this->db->connect();
        $list=$this->db->executeQuery("select * from lb_news where newsid not like'$id' order by newsid desc");
        $this->db->disconnect();
        return $list;
    }

}